package com.pond.pond.client;

import com.pond.common.core.domain.R;
import com.pond.pond.config.FeignInnerConfig;
import com.pond.system.api.domain.SysUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(name = "pond-system", contextId = "sysUserClient", configuration = FeignInnerConfig.class)
public interface SysUserClient {

    @GetMapping("/internal/user/{userId}")
    R<SysUser> getUserByIdWithToken(@PathVariable("userId") Long userId, @RequestHeader("Authorization") String token);

    @GetMapping("/user/{userId}")
    R<SysUser> getUserById(@PathVariable("userId") Long userId);

    @PostMapping("/user/batch")
    R<List<SysUser>> getUserBatch(@RequestBody List<Long> userIds);

    // ✅ 新增：获取管理员角色用户 ID 列表
    @GetMapping("/user/getAllAdminIds")
    R<List<Long>> getAllAdminIds();
}

